package com.dt.dubai.mall.entity;

import com.dt.dubai.core.comm.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.*;

import javax.persistence.Table;
import javax.validation.constraints.*;


/*
 * 商品前台分类表
 */

@Data
@Table(name = "dt_mall_web_category")
@EqualsAndHashCode(callSuper = false)
public class MallWebCategoryEntity extends BaseEntity {

    //分类等级
    @NotNull(message = "level参数不能为空")
    Long level;

    //类型 1-电商,2-检测,3-计量
    Short commodityType;

    //父级id
    @NotNull(message = "parentId参数不能为空")
    Long parentId;

    //分类名称
    @NotNull(message = "categoryName参数不能为空")
    @Length(min = 0, max = 30, message = "categoryName参数最大长度不30")
    String categoryName;

    //分类别名称
    @Length(min = 0, max = 30, message = "categoryAliasName参数最大长度不30")
    String categoryAliasName;

    //图标
    @Length(min = 0, max = 60, message = "icon参数最大长度不60")
    String icon;

    //是否展示 1-admin端,2-app端,3-web端
    Integer categoryShowType;

    //是否显示 1-显示,2-不显示
    Boolean yesShow;


}
